package l_chain_of_responsibility.b_design_pattern;

/**
 * Created by wug on 2016/8/9 0009.
 */
public class HtmlHandler implements Handler {
    @Override
    public void doFilter(Request request, Response response, FilterChain chain) {
        System.out.println("----------html过滤 begin--------");
        String str = request.getRequestStr();
        str = str.replaceAll("<", "[");
        str = str.replaceAll(">", "]");
        request.setRequestStr(str);
        response.setResponseStr(str);
        System.out.println("----------html过滤 end--------");
    }
}
